<?php

namespace App\Lib\_Validator;

use App\Constants\Rooms;

class RoomValidator extends BaseValidator
{
    public static function create(array $data)
    {
        return self::make($data, [
            'type' => 'required|in:' . join(',', Rooms::TYPES),
            'number' => 'required|gte:2|lte:4',
            'score' => 'required|number|gte:0',
            'round_counts' => 'required|number|gte:1',
            'capping' => 'number|gte:0',
            'lai_zi' => 'array',
        ]);
    }
}